#include<bits/stdc++.h>

using namespace std;

int prime(int n) {
    if (n <= 1)return 0;
    //check each number in [2 ,n-1]
    for (int i = 2; i <= n - 1; i++) {
        if (n % i == 0) {
            return 0;
        }
    }
    return 1;
}

int main() {
    int n;
    cin >> n;
    int tot = 0;
    if (n >= 3)++tot;//2,3
    for (int p = 3; p + 2 <= n; p += 2) {
        if (prime(p) && prime(p + 2))
            ++tot;
    }
    cout << tot;
    return 0;
}
